{% extends "base.html" %}
{% load rfdoc_filters %}

{% block title %}{{ lib.name }}{% endblock title %}
{% block content %}
    <h2>{{ lib.name }}</h2>
    {% ifnotequal lib.version "<unknown>" %}
    <p class="version">
      <b>Version:</b> {{ lib.version }}
    </p>
    {% endifnotequal %}
    <h3 id="introduction">Introduction</h3>
      <p class="libintro">{{ lib.doc|safe }}</p>
    {% if lib.inits %}
    <h3 id="importing">Importing</h3>
    <table class="keywords">
      <tr>
        <th class="arg">Arguments</th>
        <th class="doc">Documentation</th>
      </tr>
      {% for init in lib.inits %}
      <tr>
        <td class="arg">{{ init.args }}</td>
        <td class="doc">{{ init.doc|safe }}</td>
      </tr>
      {% endfor %}
    </table>
    {% endif %}
    <h3>Shortcuts</h3>
    <div class='shortcuts'>{% for kw in lib.keywords %}
      <a href="#{{ kw.name|nospaces }}" title="{{ kw.shortdoc }}">{{ kw.name }}</a>{% if not forloop.last %} &middot; {% endif %}{% endfor %}
    </div>

    <h3>Keywords</h3>
    <table class="keywords">
      <tr>
        <th class="kw">Keyword</th>
        <th class="arg">Arguments</th>
        <th class="doc">Documentation</th>
      </tr>
      {% for kw in lib.keywords %}
      <tr>
        <td class="kw" id="{{ kw.name|nospaces }}">{{ kw.name }}</td>
        <td class="arg">{{ kw.args }}</td>
        <td class="doc">{{ kw.doc|safe }}</td>
      </tr>
      {% endfor %}
    </table>
    <div class="hr"><hr /></div>
    <p class="info">Altogether {{ lib.keywords|length }} keywords.</p>
{% endblock content %}
